#include "editorwindow.h"
#include <QApplication>
#include "EditorWidgets/dialogeditor.h"
#include "EditorWidgets/initwidget.h"
#include "UIEditor/uieditorwidget.h"
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    InitWidget i;
    //判断当前运行的是游戏还是编辑器
    QString path = FileManager::Instance().gameManagerData;
    QJsonObject* ob = FileManager::Instance().ReadJsonFile(path);
    if(ob && ob->contains("isGame") && (*ob)["isGame"].toBool())
    {
        EditorWindow::Instance().showMaximized();
        SoundManager::Instance();
        emit EventCenter::Instance().RunGame();
    }
    else
    {
        i.show();
    }
    return a.exec();
}
